import request from "@/utils/request";

// 查询小程序活动信息列表
export function listActivity_information(query) {
  return request({
    url: "/view/activity_information/list",
    method: "get",
    params: query,
  });
}

// 查询小程序活动信息详细
export function getActivity_information(id) {
  return request({
    url: "/view/activity_information/info",
    method: "get",
    params: { id: id },
  });
}

// 新增小程序活动信息
export function addActivity_information(data) {
  return request({
    url: "/view/activity_information",
    method: "post",
    data: data,
  });
}

// 修改活动信息
export function updateActivity_information(data) {
  return request({
    url: "/view/activity_information",
    method: "put",
    data: data,
  });
}

//获取活动详情数据
export function updateActivity_info(data) {
  return request({
    url: "/view/activity_information/getInfo",
    method: "get",
    params: data,
  });
}

// 删除小程序活动信息
export function delActivity_information(id) {
  return request({
    url: "/view/activity_information/" + id,
    method: "delete",
  });
}

// 导出小程序活动信息
export function exportActivity_information(query) {
  return request({
    url: "/view/activity_information/export",
    method: "get",
    params: query,
  });
}

// 获取乡镇列表
export function town_list(query) {
  return request({
    url: "/view/activity_information/listTownShip",
    method: "get",
    params: query,
  });
}

//查询活动的报名人信息
export function getUser(query) {
  return request({
    url: "/view/activity_information/getUser",
    method: "get",
    params: query,
  });
}

//导出活动的报名人信息
export function getUser_export(data) {
  return request({
    url: "/view/activity_information/exportUser",
    method: "post",
    params: data,
  });
}

//获取景区列表
export function getLandscapes_list(query) {
  return request({
    url: "/view/activity_information/listLandscapes",
    method: "get",
    params: query,
  });
}

//获取场所列表
export function getPlace_list(query) {
  return request({
    url: "/view/activity_information/listVenue",
    method: "get",
    params: query,
  });
}

//新增活动配置
export function allocatione_add(data) {
  return request({
    url: "/view/activity_information/allocation",
    method: "post",
    data: data,
  });
}

//活动配置列表
export function allocatione_list(query) {
  return request({
    url: "/view/activity_information/getAllocationList",
    method: "get",
    params: query,
  });
}
//活动配置列表详情信息
export function allocatione_detail(query) {
  return request({
    url: "/view/activity_information/AllocationDetail",
    method: "get",
    params: query,
  });
}

// 删除活动配置列表
export function allocatione_delete(id) {
  return request({
    url: "/view/activity_information/removeAllocation/" + id,
    method: "delete",
  });
}

//获取动态列表
export function dynamic_list(query) {
  return request({
    url: "/view/activity_information/listDynamics",
    method: "get",
    params: query,
  });
}

//获取商品列表
export function commodity_list(query) {
  return request({
    url: "/view/activity_information/listCommodity",
    method: "get",
    params: query,
  });
}

//报名人审核操作接口
export function peopleExamine(query) {
  return request({
    url: "/view/activity_information/peopleExamine",
    method: "put",
    params: query,
  });
}

//获取券码列表
export function couponCode_list(query) {
  return request({
    url: "/view/activity_information/getCodeByAc",
    method: "get",
    params: query,
  });
}

//发送券码
export function couponCode_sendout(query) {
  return request({
    url: "/view/activity_information/grantAcCode",
    method: "post",
    params: query,
  });
}
